package com.example.mybiadushoujiweishi.activity.acivitys.fragments;

import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;


import com.example.mybiadushoujiweishi.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by Administrator on 2017/6/14 0014.
 */

public class ThridSosfragment extends Fragmentbase {
    @BindView(R.id.iv_animation)
    ImageView ivAnimation;
    Unbinder unbinder;

    @Override
    public int getXml() {
        return R.layout.sos;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {





    }







    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);

        ivAnimation.setBackgroundResource(R.drawable.sosanimal);
        AnimationDrawable animation = (AnimationDrawable) ivAnimation.getBackground();
        animation.start();
     /*   ivAnimation.post(new Runnable() {
            @Override
            public void run() {

             animation.start();

            }
        });*/


        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
